import React, { useMemo } from 'react';
import { palette, useDarkMode } from '@mongodb-js/compass-components';

const ZeroGraphic = () => {
  const darkMode = useDarkMode();
  const strokeColor = useMemo(
    () => (darkMode ? palette.white : palette.black),
    [darkMode]
  );

  return (
    <svg
      width="72"
      height="72"
      viewBox="0 0 72 72"
      fill="none"
      xmlns="http://www.w3.org/2000/svg"
    >
      <path
        d="M68 31.975H65.8901M65.8901 31.975C62.7253 31.975 60.2637 34.425 60.2637 37.575V55.775C60.2637 60.325 56.5714 64 52 64H20C15.4286 64 11.7363 60.325 11.7363 55.775V37.575C11.7363 34.425 9.27472 31.975 6.10989 31.975M65.8901 31.975C62.7253 31.975 60.2637 29.525 60.2637 26.375V16.225C60.2637 11.675 56.5714 8 52 8H20C15.4286 8 11.7363 11.675 11.7363 16.225V26.375C11.7363 29.525 9.27472 31.975 6.10989 31.975M6.10989 31.975H4M20 11.0331C20 11.0331 34.0659 15.0771 52 11.0331"
        stroke={strokeColor}
        strokeMiterlimit="10"
      />
      <path
        d="M24 36.1318C24 42.7318 29.4 48.1318 36 48.1318C42.6 48.1318 48 42.7318 48 36.1318C48 29.5318 42.6 24.1318 36 24.1318C29.4 24.1318 24 29.5318 24 36.1318Z"
        fill={palette.green.base}
        stroke={strokeColor}
        strokeMiterlimit="10"
      />
      <path
        d="M31 36.1318H31.3982M31.3982 36.1318C31.9735 36.1318 32.4159 36.5718 32.4159 37.0518V38.7718C32.4159 39.5318 33.0797 40.1318 33.9204 40.1318M31.3982 36.1318C31.9735 36.1318 32.4161 35.6919 32.4161 35.2119V33.4919C32.4161 32.7318 33.0798 32.1318 33.9205 32.1318M41 36.1318H40.6018M40.6018 36.1318C40.0265 36.1318 39.5841 36.5718 39.5841 37.0518V38.7718C39.5841 39.5318 38.9203 40.1318 38.0796 40.1318M40.6018 36.1318C40.0265 36.1318 39.5841 35.6919 39.5841 35.2119V33.4919C39.5841 32.7318 38.9203 32.1318 38.0796 32.1318"
        stroke={strokeColor}
        strokeMiterlimit="10"
      />
    </svg>
  );
};

function LoadSampleDataZeroGraphic(
  props: React.SVGProps<SVGSVGElement> & { size?: number }
) {
  const size = props.size ?? 60;
  return (
    <svg
      xmlns="http://www.w3.org/2000/svg"
      viewBox="0 0 60 60"
      width={size}
      height={size}
      {...props}
    >
      <g fill="none">
        <path
          fill="#116149"
          d="M52.75 43.75c0-4.97-4.03-9-8.998-9a9 9 0 0 0-9.002 9 9.001 9.001 0 0 0 18 0zm2 0c0 6.074-4.926 11-10.998 11-6.076 0-11.002-4.925-11.002-11 0-6.077 4.925-11 11.002-11 6.072 0 10.998 4.925 10.998 11z"
        />
        <path
          fill="#116149"
          d="M50.113 51.527a1 1 0 0 1 1.414-1.414l7.93 7.93a1 1 0 0 1-1.414 1.414zM27.012 45a1 1 0 0 1 0 2H6a6 6 0 0 1-6-6V6a6 6 0 0 1 6-6h47.5c3.312 0 6 2.688 6 6v35a1 1 0 0 1-2 0V6c0-2.208-1.792-4-4-4H6a4 4 0 0 0-4 4v35a4 4 0 0 0 4 4z"
        />
        <path
          fill="#116149"
          d="M1 14a1 1 0 0 1 0-2h57.5a1 1 0 0 1 0 2zm11.25-6.5a2.249 2.249 0 1 1-4.5 0 2.249 2.249 0 1 1 4.5 0zm7.5 0a2.249 2.249 0 1 1-4.5 0 2.249 2.249 0 1 1 4.5 0zm7.5 0a2.25 2.25 0 1 1-4.5 0 2.25 2.25 0 0 1 4.5 0z"
        />
        <path
          fill="#16cc62"
          d="M8.789 22a1 1 0 0 1 0-2h9.883a1 1 0 0 1 0 2zm0 16a1 1 0 0 1 0-2h4.883a1 1 0 0 1 0 2zm0-8a1 1 0 0 1 0-2h12.383a1 1 0 0 1 0 2zm10 8a1 1 0 0 1 0-2h9.883a1 1 0 0 1 0 2zm7.5-8a1 1 0 0 1 0-2h12.383a1 1 0 0 1 0 2zm-2.5-8a1 1 0 0 1 0-2h12.422a1 1 0 0 1 0 2zm17.539 0a1 1 0 0 1 0-2h9.922a1 1 0 0 1 0 2zm2.5 8a1 1 0 0 1 0-2h7.423a1 1 0 0 1 0 2z"
        />
      </g>
    </svg>
  );
}

export { ZeroGraphic, LoadSampleDataZeroGraphic };
